%@ page import=" java.util.ArrayList , java.util.Collection , java.util.Collections , java.util.Iterator , java.util.List , ysl.util.Log , ysl.util.JSCalendar , ysl.util.Log , ysl.buslog.orgs.OrgEntity , ysl.ui.session.YslSession , ysl.util.StaticData , ysl.util.Term , ysl.util.Utils , ysl.buslog.orgs.Club , ysl.buslog.competitions.Competition , ysl.buslog.competitions.Division , ysl.buslog.competitions.Season , ysl.buslog.users.Role , ysl.buslog.users.User , ysl.buslog.users.UserRole " %> <%@ include file="TestSessionFragment.jsp" %> <% String leagueParam = request.getParameter("leagueId"); League league = null; boolean abort = false; boolean showInfo = YslSession.getViewLeagueInfo(session); boolean showAffiliates = YslSession.getViewLeagueAffiliates(session); boolean showOfficers = YslSession.getViewLeagueOfficers(session); boolean showInactiveSeasons = YslSession.getViewInactiveSeasons(session); boolean haveSeasonHeader = false; boolean refEdit = false; // When a user clicks on an inactive season, we issue a request parameter, // called "addSeason", with the id of the season. If this parameter is present, // we set this attribute into the session, to trigger showing this // inactive season, below. If the parameter equals the string "none", it // means that the user is closing the display of an inactive season, in which // case we remove the session attribute. -- Eben 8/16/02 int addSeasonId = YslSession.getAddedSeasonId(session); String addSeasonParam = request.getParameter("addSeason"); if (Utils.hasData(addSeasonParam)) { if (addSeasonParam.equals("none")) { addSeasonId = 0; YslSession.setAddedSeasonId(session, 0); } else { addSeasonId = Integer.parseInt(addSeasonParam); YslSession.setAddedSeasonId(session, addSeasonId); } } if (leagueParam != null) { league = League.getInstance(leagueParam); session.setAttribute("currentLeague", league); } else { league = (League)session.getAttribute("currentLeague"); } YslSession.setEditUserReturnJsp(session, "ViewLeague.jsp?leagueId=" + league.getId()); if (league == null || league.getName() == null) { // Send them to the page where they choose a league. Happens when // someone uses a favorite while sitting on the login screen, apparently. Also // happens if someone tries to come directly in with a favorite while currentUser is // not null, it seems. ServletUtils.sendRedirect("/ViewLeagueChoose.jsp?YSLkey=" + YSLkey + "&leagueId=0", request, response); return; } Season season = league.getActiveSeason(); String pageTitle = "View League"; %> <%@ include file="header.jsp" %>
Seasons and Competitions |
User Home
<%
if (league != null && league.getAdminRole() != null && currentUserRole.getId() == league.getAdminRole().getId()) {
%>
| Edit League
<%
}
if (currentUserRole.getRoleId() == Role.GUEST_ID && YslSession.getSpecialGuest(session) != null) {
%>
| Log Out
<%
}
%>
| User Help
<%
Collection parents = league.getAllParents();
if (parents.size() > 0) {
out.print(" Parent League Links: "); Iterator parentIter = parents.iterator(); int i=0; while (parentIter.hasNext()) { League parent = (League)parentIter.next(); if (parent != null && parent.isActive()) { if (i>0) { out.println(" | "); } out.print( "" ) ; out.print( parent.getLeagueName() ) ; out.println( ""); i++; } } } %> |